import java.sql.Connection;
import java.sql.DriverAction;
import java.sql.DriverManager;
import java.sql.Statement;

public class JDBC {
    public static void main(String[] args) throws Exception {
        //获取连接
        String url="jdbc:mysql://127.0.0.1:3306/cd";
        String user="root";
        String password="111111";
        Connection conn = DriverManager.getConnection(url, user, password);
        //定义SQl
        String Sql="select * from `客户信息`";
        //获取Sql执行对象
        Statement statement = conn.createStatement();
        //执行SQL
        int i = statement.executeUpdate(Sql);
        //处理结果
        System.out.println(i);
        statement.close();
        conn.close();
    }
}
